package ejb;

import java.util.List;

import javax.ejb.Remote;

import model.Myuser;

@Remote
public interface UserFacadeEJBRemote {
	
	public boolean validate(String username,String password);//check DB if password matches username, if yes return true else return false
	public boolean createUser(String username, String password);
	public boolean createUser(String username, String password,String authority);//insert a user into DB, if success return true else return false
	public boolean deleteUser(int userid);//delete by userid, if success return true else return false
	public Myuser findUserByName(String username);//return a user according to username
	public List<Myuser> getUserByAuthority(String authority);
	public boolean isNameExist(String username);//check DB if username already exists
	public Myuser findUserByID(int userid);
	public List<Myuser> getAllUser();
	
}
